-- GENERATED SPELL FOR [Mmmrrrggglll] --


function spell0_15937(pUnit, Event) --@Chain Lightning,n/a--
pUnit:FullCastSpellOnTarget(12058,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15937', 3000, 1)
end

function spell1_15937(pUnit, Event) --@Frost Shock,n/a--
pUnit:FullCastSpellOnTarget(21030,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15937', 8256, 1)
end

function spell2_15937(pUnit, Event) --@Healing Wave,Heal--
pUnit:FullCastSpellOnTarget(12491,pUnit)
pUnit:RegisterEvent('Sorts_15937', 3000, 1)
end

function Sorts_15937(pUnit, Event)
local choix_sorts_15937 = math.random(0, 2)
if choix_sorts_15937 == 0 then
pUnit:RegisterEvent('spell0_15937', 1, 1)
end
if choix_sorts_15937 == 1 then
pUnit:RegisterEvent('spell1_15937', 1, 1)
end
if choix_sorts_15937 == 2 then
pUnit:RegisterEvent('spell2_15937', 1, 1)
end
end

function mob15937_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_15937', math.random(1500, 3000), 1)
end

function mob15937_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15937_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15937_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(15937, 1, 'mob15937_Action')
RegisterUnitEvent(15937, 2, 'mob15937_Leave')
RegisterUnitEvent(15937, 3, 'mob15937_Kill')
RegisterUnitEvent(15937, 4, 'mob15937_Die')
